package com.fs.api.client;

import com.fs.api.config.FeignConfig;
import com.fs.api.domain.vo.AlertDetailVO;
import com.fs.common.domain.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "alert-service", configuration = FeignConfig.class)
public interface AlertClient {
    @GetMapping("/alerts/{id}")
    Result<AlertDetailVO> getAlertDetail(@PathVariable Long id,
                                         @RequestParam(required = false, defaultValue = "true") boolean withOthers);

    @GetMapping("/alert-robot/robot/{robotId}")
    Result<List<Long>> getAlertIdsByRobotId(@PathVariable("robotId") Long robotId);

    @GetMapping("/alert-employee/get-employee-id/{alertId}")
    Result<Long> getEmployeeId(@PathVariable("alertId") Long alertId);
}
